package cn.edu.uestc.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.List;

public class Order {
    private int id;//订单id
    private String username;//用户的username
    private String shopName;//商家的username
    private String productName;//商品名称
    private String status;//状态
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date orderTime;//下单时间
    private String shipper;//发货人
    private String shippingAddress;//发货地址
    private long shipperPhone;//发货人手机
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date shipTime;//发货时间
    private String receiver;//接收人
    private String receiverAddress;//接收地址
    private long receiverPhone;//接收人号码
    private List<Logistics> logistics;//物流信息

    public Order() {}
    public Order(int id, String username, String shopName, String productName, String status, Date orderTime, String shipper,
                 String shippingAddress, long shipperPhone, Date shipTime, String receiver, String receiverAddress,
                 long receiverPhone, List<Logistics> logistics) {
        this.id = id;
        this.username = username;
        this.shopName = shopName;
        this.productName = productName;
        this.status = status;
        this.orderTime = orderTime;
        this.shipper = shipper;
        this.shippingAddress = shippingAddress;
        this.shipperPhone = shipperPhone;
        this.shipTime = shipTime;
        this.receiver = receiver;
        this.receiverAddress = receiverAddress;
        this.receiverPhone = receiverPhone;
        this.logistics = logistics;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public String getShipper() {
        return shipper;
    }

    public void setShipper(String shipper) {
        this.shipper = shipper;
    }

    public String getShippingAddress() {
        return shippingAddress;
    }

    public void setShippingAddress(String shippingAddress) {
        this.shippingAddress = shippingAddress;
    }

    public long getShipperPhone() {
        return shipperPhone;
    }

    public void setShipperPhone(long shipperPhone) {
        this.shipperPhone = shipperPhone;
    }

    public Date getShipTime() {
        return shipTime;
    }

    public void setShipTime(Date shipTime) {
        this.shipTime = shipTime;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }

    public long getReceiverPhone() {
        return receiverPhone;
    }

    public void setReceiverPhone(long receiverPhone) {
        this.receiverPhone = receiverPhone;
    }

    public List<Logistics> getLogistics() {
        return logistics;
    }

    public void setLogistics(List<Logistics> logistics) {
        this.logistics = logistics;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", shopName='" + shopName + '\'' +
                ", productName='" + productName + '\'' +
                ", status='" + status + '\'' +
                ", orderTime=" + orderTime +
                ", shipper='" + shipper + '\'' +
                ", shippingAddress='" + shippingAddress + '\'' +
                ", shipperPhone=" + shipperPhone +
                ", shipTime=" + shipTime +
                ", receiver='" + receiver + '\'' +
                ", receiverAddress='" + receiverAddress + '\'' +
                ", receiverPhone=" + receiverPhone +
                ", logistics=" + logistics +
                '}';
    }
}
